//
// Source code recreated from a .class file by IntelliJ IDEA
// (powered by FernFlower decompiler)
//

package org.example.aaaatest.a2;

import java.net.InetAddress;
import java.net.UnknownHostException;
import java.text.SimpleDateFormat;
import java.util.Date;

public class ErrorMsgUtil {
    private static final String IP = initialIp();
    private static final ThreadLocal<SimpleDateFormat> DATEFORMATER = new ThreadLocal<SimpleDateFormat>() {
        protected synchronized SimpleDateFormat initialValue() {
            return new SimpleDateFormat("yyyyMMddHHmm");
        }
    };

    public ErrorMsgUtil() {
    }

    private static String initialIp() {
        try {
            InetAddress address = InetAddress.getLocalHost();
            return address.getHostAddress();
        } catch (UnknownHostException var11) {
            return "UNKOWN-HOST-IP";
        }
    }

    public static String getErrorMsg(String msg) {
        StringBuilder builder = new StringBuilder();
        builder.append(msg);
        builder.append('$');
        builder.append(IP);
        builder.append('$');
        builder.append(((SimpleDateFormat)DATEFORMATER.get()).format(new Date()));
        return builder.toString();
    }
}
